﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SlimDX;

namespace RaygunDiplomacy.ViewModel.Isometric
{
   public enum ViewDirection
   {
      Northwest,
      Northeast,
      Southwest,
      Southeast
   }

   public class IsoCamera
   {
      public const string CurrentDirectionProperty = "CurrentDirection";
      public const string FocusProperty = "Focus";

      ViewDirection currentDirection;

      public ViewDirection CurrentDirection
      {
         get { return currentDirection; }
         set 
         {
            if (currentDirection != value)
            {
               currentDirection = value;
               propertyChanged.OnNext(CurrentDirectionProperty);
            }
         }
      }

      Vector3 focus;

      public Vector3 Focus
      {
         get { return focus; }
         set
         {
            if (focus != value)
            {
               focus = value;
               propertyChanged.OnNext(FocusProperty);
            }
         }
      }

      Subject<string> propertyChanged = new Subject<string>();

      public IObservable<string> PropertyChanged
      {
         get { return propertyChanged; }
      }
   }
}
